#include "LinkedStack.h"

void test1() {
    LinkedStack* s = init_stack();
    if (is_empty(s)) {
        printf("is_empty: Stack is empty.\n");
    }
    push(s, 1);
    push(s, 2);
    push(s, 3);
    push(s, 4);
    push(s, 5);
    push(s, 6);
    printf("top: %d\n", top(s));
    pop(s);
    printf("top: %d\n", top(s));
    pop_all(s);
    clear_stack(s);
    s = NULL;
}

int main() {
    void (*test[])() = {test1};
    int len = sizeof(test) / sizeof(*test);
    for (int i = 0; i < len; ++i) {
        test[i]();
    }
    return 0;
}